<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <title>htp游戏大厅</title>
    <link rel="stylesheet" href="__CSS__/index.css"/>
    <link rel="stylesheet" href="__CSS__/jquery-weui.min.css"/>
    <link rel="stylesheet" href="__CSS__/weui.min.css"/>
    <script src="__JS__/jquery-1.12.4.min.js"></script>
    <script src="__JS__/jquery-weui.min.js"></script>
</head>
<body>
<div class="head">
    <div class="photo">
        <img src="__STATIC__/images/men.jpg" alt=""/>
    </div>
    <div class="name" id="id_wx_nick">
    {$userInfo.user_nickname|default=''}
    </div>
    <div class="change">
        <img src="__STATIC__/images/changename.png" alt="" class="xg"/>
    </div>
</div>
<div class="lastGame_box">
    <div class="lastGame_title">最近试玩</div>
    <div class="lastGame_list">
        <ul style="width: 830px">
            <volist name="userInfo.history_list" id="vo" empty="暂无">
                <li>
                    <a href="{$vo.play_url}">
                        <div class="lastGame">
                        <div class="lastGame_img_box">
                            <img src="__UPLOAD__/{$vo.game_logo}" alt=""/>
                        </div>
                        <p>{$vo.game_name}</p>
                        </div>
                    </a>
                </li>
            </volist>
        </ul>
    </div>
</div>
<div class="banner">
    <img src="__STATIC__/images/banner_wechat1.jpg" alt=""/>
</div>
<div class="gameList_bg">
<div class="gameList_box" id="id_wx_gameBox">
<ul id="id_wx_gameType">
    <volist name="gameList" id="vo">
        <li>
            <div class="gameList">
                <div class="gameList_img_box">
                    <img src="__UPLOAD__/{$vo.game_logo}" alt=""/>
                </div>
                <div class="gameList_name">
                    <span>{$vo.game_name}</span>
                    <p>{$vo.brief}</p>
                </div>
                <div class="anniu">
                    <volist name="vo.multiple_list" id="vo1">
                        <button>{$vo1}倍场</button>
                    </volist>
                </div>
            </div>
        </li>
    </volist>
</ul>
</div>
</div>
<script>
    $(function(){
    $(".xg").click(function(){
        $.prompt({
            title: '修改昵称',
            text: '请输入昵称',
            input: '',
            empty: false, // 是否允许为空
            onOK: function (input) {
            //确认时执行一个事件
                $.ajax({
                    url:"{:url('/u')}",
                    data:{nickname:input},
                    success:function(re){
                        if(re['code'] == 1){
                            $("#id_wx_nick").text(input);
                            $.alert({
                                title: '温馨提示:',
                                text: re['msg']
                            });
                        }
                    }
                });

            },
            onCancel: function () {
            //取消时执行一个事件
            }
        });
    })
    })
</script>
</body>
</html>
